Patent Document 1 discloses a display device having a touch detection function in which a common electrode is divided into a plurality of pieces, and the plurality of the common electrode pieces are used as touch electrodes. In the display device having a touch detection function disclosed in Patent Document 1, a plurality of common electrode pieces obtained by dividing the common electrode and the controller are connected with each other by a plurality of signal lines, so that the controller detects a touch position.